CC = gcc
LD = gcc
CFLAGS = -g -Wall -I/usr/include/ -std=gnu99
LDFLAGS = -lSDL -lGL -lSDL_image
RM = /bin/rm -f

PROG = prism

SRC = messages.c memory.c prism.c
OBJ = messages.o memory.o prism.o
INCLUDE_DIR = ../src/

# top-level rule, to compile everything.
all: $(PROG)

# now add a line to include the dependency list.
#include .depend

# rule to link the program
$(PROG): $(OBJ)
	$(LD) $(LDFLAGS) $(OBJ) -o $(PROG)

# rule for cleaning re-compilable files.
clean:
	$(RM) $(PROG) $(OBJ)


# most of the makefile remains as it was before.
# at the bottom, we add these lines:

# rule for building dependency lists, and writing them to a file
# named ".depend".
depend:
	$(RM) .depend
	makedepend -- $(CFLAGS) -- $(SRC)

# DO NOT DELETE THIS LINE -- make depend depends on it.

